package io.github.betacatcode.model;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.math.BigDecimal;


@AllArgsConstructor
@Data
public class Money {
    private BigDecimal amount;

    public void verify() throws Exception {
        if (amount == null || amount.compareTo(new BigDecimal("0")) == -1) {
            throw new Exception("转账金额不合法");
        }
    }
}
